package com.loan.market.ui

import android.content.Intent
import android.os.Bundle
import com.loan.market.base.BaseBindingActivity
import com.loan.market.databinding.ActivitySettingBinding
import com.loan.market.event.LogoutEvent
import com.loan.market.util.UserUtil
import org.greenrobot.eventbus.EventBus

class SettingActivity : BaseBindingActivity<ActivitySettingBinding>() {

    override fun getViewBinding(): ActivitySettingBinding {
        return ActivitySettingBinding.inflate(layoutInflater)
    }

    override fun initUi(savedInstanceState: Bundle?) {

    }

    override fun initEvent() {
        binding.btnOut.setOnClickListener {
            UserUtil.logout()
            EventBus.getDefault().post(LogoutEvent())
            startActivity(Intent(this, LoginActivity::class.java))
            finish()
        }
    }

    override fun initData() {

    }
}